/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved. 
 */
package com.icinfo.cloud.provider.punish.config.controller;

import com.icinfo.cloud.provider.punish.config.dto.ConfigDocumentApprovalFlowAutoRequest;
import com.icinfo.cloud.provider.punish.config.service.IConfigDocumentApprovalFlowAutoService;
import com.icinfo.cloud.provider.punish.config.vo.ConfigDocumentApprovalFlowAutoVo;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.web.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 描述:  config_document_approval_flow_auto 对应的Controller类.<br>
 *
 * @author framework generator
 * @date 2022年12月05日
 */
@RestController
@RequestMapping("/punish/config/configDocumentApprovalFlowAuto")
public class ConfigDocumentApprovalFlowAutoController extends BaseController {
    /**
     * 日志记录器
     */
    private static final Logger logger = LoggerFactory.getLogger(ConfigDocumentApprovalFlowAutoController.class);

    @Autowired
    private IConfigDocumentApprovalFlowAutoService configDocumentApprovalFlowAutoService;

    /**
     * 文书自动审批配置信息列表
     * @author liyafeng
     * @date 2022/12/5
     * @param request
     * @return {@link Result <  PageResponse < ConfigApprovalFlowAutoVo>>}
     */
    @PostMapping("/getlist")
    public Result<List<ConfigDocumentApprovalFlowAutoVo>> list(@RequestBody @Validated ConfigDocumentApprovalFlowAutoRequest request) {
        List<ConfigDocumentApprovalFlowAutoVo> configDocumentApprovalFlowAutoVos=configDocumentApprovalFlowAutoService.getConfigDocumentApprovalFlowAutoVoList(request);
        return Result.success("获取成功",configDocumentApprovalFlowAutoVos);
    }
}